package com.ap.core.exception;

/**
 * The Class APCoreException.
 * @author Siva.Pochana
 */
public class APCoreException extends Exception {

	/** The error num. */
	private String errorNum;
	
	/** The error msg. */
	private String errorMsg;
	
	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 1L;

	/**
	 * Instantiates a new aP core exception.
	 *
	 * @default constructor
	 */
	public APCoreException() {
		super();
	}

	/**
	 * Instantiates a new aP core exception.
	 *
	 * @param errorNum the error num
	 */
	public APCoreException(String errorNum) {
		super(errorNum);
	}
	
	/**
	 * Instantiates a new aP core exception.
	 *
	 * @param errorNum the error num
	 * @param errorMsg the error msg
	 */
	public APCoreException(String errorNum, String errorMsg) {
		super(errorNum+":"+errorMsg);
		this.errorNum = errorNum;
		this.errorMsg = errorMsg;
	}
	
	/**
	 * Instantiates a new aP core exception.
	 *
	 * @param errorNum the error num
	 * @param throwable the throwable
	 */
	public APCoreException(String errorNum, Throwable throwable) {
		super(errorNum, throwable);
		this.errorNum = errorNum;
	}
	
	/**
	 * APUI consumer portal exception.
	 *
	 * @param throwable the throwable
	 */
	public APCoreException(Throwable throwable) {
		super(throwable);
	}

	/**
	 * Gets the error num.
	 *
	 * @return the error num
	 */
	public String getErrorNum() {
		return errorNum;
	}

	/**
	 * Gets the error msg.
	 *
	 * @return the errorMsg
	 */
	public String getErrorMsg() {
		return errorMsg;
	}
}
